package com.springcloud.learn.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.springcloud.learn.web.service.CalcService;

@RestController
public class CalcController {

	@Autowired
	CalcService calcService;
	
	@RequestMapping(value = "add")
	public int calc (@RequestParam(required = true)Integer a ,@RequestParam(required = true) Integer b ){
		return calcService.add(a, b);
	}
}
